package com.swas.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * buy_check
 * @author 
 */
public class BuyCheck implements Serializable {
    private Integer id;

    private Integer stockid;

    private String description;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date usedate;

    private Integer buysum;

    private Long money;

    private String buyman;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date buydate;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkdate;

    private String ischecked;

    private String checkman;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getStockid() {
        return stockid;
    }

    public void setStockid(Integer stockid) {
        this.stockid = stockid;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getUsedate() {
        return usedate;
    }

    public void setUsedate(Date usedate) {
        this.usedate = usedate;
    }

    public Integer getBuysum() {
        return buysum;
    }

    public void setBuysum(Integer buysum) {
        this.buysum = buysum;
    }

    public Long getMoney() {
        return money;
    }

    public void setMoney(Long money) {
        this.money = money;
    }

    public String getBuyman() {
        return buyman;
    }

    public void setBuyman(String buyman) {
        this.buyman = buyman;
    }

    public Date getBuydate() {
        return buydate;
    }

    public void setBuydate(Date buydate) {
        this.buydate = buydate;
    }

    public Date getCheckdate() {
        return checkdate;
    }

    public void setCheckdate(Date checkdate) {
        this.checkdate = checkdate;
    }

    public String getIschecked() {
        return ischecked;
    }

    public void setIschecked(String ischecked) {
        this.ischecked = ischecked;
    }

    public String getCheckman() {
        return checkman;
    }

    public void setCheckman(String checkman) {
        this.checkman = checkman;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BuyCheck other = (BuyCheck) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStockid() == null ? other.getStockid() == null : this.getStockid().equals(other.getStockid()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getUsedate() == null ? other.getUsedate() == null : this.getUsedate().equals(other.getUsedate()))
            && (this.getBuysum() == null ? other.getBuysum() == null : this.getBuysum().equals(other.getBuysum()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getBuyman() == null ? other.getBuyman() == null : this.getBuyman().equals(other.getBuyman()))
            && (this.getBuydate() == null ? other.getBuydate() == null : this.getBuydate().equals(other.getBuydate()))
            && (this.getCheckdate() == null ? other.getCheckdate() == null : this.getCheckdate().equals(other.getCheckdate()))
            && (this.getIschecked() == null ? other.getIschecked() == null : this.getIschecked().equals(other.getIschecked()))
            && (this.getCheckman() == null ? other.getCheckman() == null : this.getCheckman().equals(other.getCheckman()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStockid() == null) ? 0 : getStockid().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getUsedate() == null) ? 0 : getUsedate().hashCode());
        result = prime * result + ((getBuysum() == null) ? 0 : getBuysum().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getBuyman() == null) ? 0 : getBuyman().hashCode());
        result = prime * result + ((getBuydate() == null) ? 0 : getBuydate().hashCode());
        result = prime * result + ((getCheckdate() == null) ? 0 : getCheckdate().hashCode());
        result = prime * result + ((getIschecked() == null) ? 0 : getIschecked().hashCode());
        result = prime * result + ((getCheckman() == null) ? 0 : getCheckman().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", stockid=").append(stockid);
        sb.append(", description=").append(description);
        sb.append(", usedate=").append(usedate);
        sb.append(", buysum=").append(buysum);
        sb.append(", money=").append(money);
        sb.append(", buyman=").append(buyman);
        sb.append(", buydate=").append(buydate);
        sb.append(", checkdate=").append(checkdate);
        sb.append(", ischecked=").append(ischecked);
        sb.append(", checkman=").append(checkman);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}